package io.renren.modules.sys.entity.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import io.renren.common.utils.CommonUtils;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @email: 448476383@qq.com
 * @Author lixuejia
 * @Date 2019/10/17 8:36
 **/

@ExcelTarget("EMSVO")
@Data
public class EMSVO implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 会员码
     */
    @Excel(name="会员码",orderNum = "0")
    private String username;
    /**
     * 订单号
     */
    @Excel(name="订单号",orderNum = "1")
    private String orderSn;
    /**
     * 包裹信息
     */
    @Excel(name="包裹信息",orderNum = "2")
    private String packInfo;
    /**
     * 重量
     */
    @Excel(name="重量",orderNum = "3")
    private BigDecimal weight;
    /**
     * 收件人姓名
     */
    @Excel(name="收件人姓名",orderNum = "4")
    private String name;
    /**
     * 收件人地址1
     */
    @Excel(name="收件人地址1",orderNum = "5")
    private String address;
    /**
     * 收件人地址2
     */
    @Excel(name="收件人地址2",orderNum = "6")
    private String address2;
    /**
     * 收件人地址3
     */
    @Excel(name="收件人地址3",orderNum = "7")
    private String address3;
    /**
     * 收件人城市
     */
    @Excel(name="收件人城市",orderNum = "8")
    private String city;
    /**
     * 收件人州
     */
    @Excel(name="收件人州",orderNum = "9")
    private String province;
    /**
     * 收件人邮编
     */
    @Excel(name="收件人邮编",orderNum = "10")
    private String zipcode;
    /**
     * 收件人国家
     */
    @Excel(name="收件人国家",orderNum = "11")
    private String regionAlpha;
    /**
     * 收件人电话
     */
    @Excel(name="收件人电话",orderNum = "12")
    private String mobile;
    /**
     * 会员码
     */
    @Excel(name="会员码",orderNum = "13")
    private String email1;
    /**
     * 会员邮箱
     */
    @Excel(name="会员邮箱",orderNum = "14")
    private String email;
    /**
     * 快递状态
     */
    @Excel(name="快递状态",orderNum = "15",replace = {"等待发货_0","在途_1","揽件_2","疑难_3","妥协(签收)_4","退签_5","派件_6","退回_7","暂扣_8"})
    private Integer shippingStatus;
    /**
     * 订单状态
     */
    @Excel(name="订单状态",orderNum = "16" ,replace = {"未打包_0","已打包_1","已支付_2"})
    private Integer orderStatus;
    /**
     * 支付时间
     */
    private Integer payTime;
    @Excel(name="支付时间",orderNum = "17")
    private transient  String payTimeStr;
    /**
     * 金额
     */
    @Excel(name="金额",orderNum = "18")
    private BigDecimal balance_fee;
    /**
     * 快递渠道
     */
    @Excel(name="快递渠道",orderNum = "19",replace = {"EMS优惠线_9","顺丰国际专线_38","退国内圆通快递_53"} )
    private Integer shippingId;
    /**
     * 快递单号
     */
    @Excel(name="快递单号",orderNum = "20")
    private String outTrackingNumber;

    public String getEmail1() {
        return username+"@Kuaizi.com";
    }

    public void setEmail1(String email1) {
        this.email1 = email1;
    }

    public String getPayTimeStr() {
        return  payTime == null ? null : CommonUtils.timeStampToTime(CommonUtils.timeStampPlus3(payTime));
    }

    public void setPayTimeStr(String payTimeStr) {
        this.payTimeStr = payTimeStr;
    }
}
